/**
 * @license
 *
 * SkyBrush - skybrush.css
 *
 * Copyright (c) 2012 Joseph Lenton
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the <organization> nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

/*
 * # CSS Style Guide #
 *
 * All CSS rules need to be prefixed with either 'skybrush_' or 'sb_'.
 * This is to ensure SkyBrush doesn't conflict with existing CSS,
 * especially for stuff like 'hide', 'show' and 'wrap', which are
 * pretty common.
 *
 * Originally SkyBrush also used some very long CSS rules, and this
 * allows us to remove them all, and set CSS properties with a less
 * comples single rule.
 *
 * # Components: skybrush_
 *
 * All components begin with 'skybrush_'. For example the 'top_bar'
 * becomes 'skybrush_top_bar'.
 *
 * Rules are also concatonated togethor, to avoid cost, and to make
 * rules shorter. For example:
 *
 *      .skybrush .top_bar .wrap
 *
 * becomes:
 *
 *      .skybrush_top_bar_wrap
 *
 * # Use Child Selector Rule: .foo > .bar > .foobar
 *
 * If you do need a multi-part rule, always use the explicit child
 * selector, over the less explicit one (where possible).
 *
 * For example this is bad:
 *
 *      .info_bar .wrap .inner
 *
 * ... this is *much* better:
 *
 *      .info_bar > .wrap .inner
 *
 * ... and of course this is best:
 *
 *      .skybrush_info_bar_inner
 *
 * Does it really matter? Yes! Totally, especially when your dealing
 * with something quite large, it can make a *big* performance
 * difference in certain browser (*cough* Chrome *cough*).
 *
 * # Types: sb_
 *
 * Some components have a state, such as 'show' or 'hidden', and
 * controls have certain types such as 'slider'. These are prefixed
 * with 'sb_'.
 *
 * For example:
 *
 *      .skybrush_gui.hide
 *
 * becomes:
 *
 *      .skybrush_gui.sb_hide
 *
 * # GUI Window Prefix: sb_gui_
 *
 * 'sb_' is also used for some other special prefixes, for when these
 * names are worked out in code.
 *
 * For example we have a 'skybrush_gui' for colours, which has the
 * 'colors' css class. So the GUI is: .skybrush_gui.colors
 *
 * However 'sb_gui_' is added to the type name, 'colors', and so this
 * becomes: .skybrush_gui.sb_gui_colors
 *
 * Again this is to avoid clashes, in case 'colors' is used in
 * multiple places (both in SkyBrush and elsewhere). This way the rule
 * 'sb_gui_colors' always grabs the 'colors' GUI.
 *
 * # Command Tool Button: sb_command_
 *
 * The same is also true for 'sb_command_', which is used for the
 * command buttons. These are the pencil, line,  rectangle, brush,
 * colour picker and other command buttons. So for example 'rectangle'
 * becomes 'sb_command_'.
*/

/*
 * Common properties for all elements in SkyBrush.
 *
 * Such as all links having no underline, and all non-text inputs
 * having no user select, and common reset properties.
*/
.skybrush_topbar,
.skybrush_topbar *,
.skybrush_viewport,
.skybrush_viewport * {
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;

}
.skybrush :not(input) {
    -webkit-appearance: none;
}

.skybrush a,
.skybrush a:hover,
.skybrush a:visited,
.skybrush a:focus {
    text-decoration: none;
}

.skybrush_input,
.skybrush_rgb_input,
.skybrush_controls_header_text,
.skybrush_button,
.skybrush_input_button,
.skybrush_command_control_label,
.skybrush_rgb_label {
    /*font-family: sans-serif;*/
    color: #444;
    outline: medium none;
}
.skybrush_command_control_label {
    float: left;
    font-size: 11px;
    font-weight: bold;
}
.skybrush_rgb_label {
    vertical-align: baseline;
    padding: 0;
    margin: 0;
}

/**
 * Common SkyBrush Controls.
 *
 * Common classes used throughout SkyBrush,
 * and more importantly, SkyBrush GUI elements.
*/

.skybrush_slider_bar {
    width: 100%;

    display: block;

    position: relative;

    float: left;
}
.skybrush_slider_bar.sb_fake {
    height: 10px;
    top: 13px;
    cursor: pointer;
}
.skybrush_slider_bar_inner {
    position: absolute;

    width: 100%;
    height: 2px;
    background: #7F7F7F;

    border-radius: 2px;
    box-shadow: 0 0 5px rgba( 0, 51, 102, 0.35 );

    top: 50%;
    margin-top: -1px;
}
.skybrush_slider_bar_slider {
    background: url(./../img/slider_arrow.png) no-repeat 0 0;
    height: 13px;
    width: 8px;

    position: absolute;
    top: -2px;
    margin-left: -4px;

    display: block;

    cursor: pointer;
}

.skybrush_rgb_input,
.skybrush_input {
    display: inline-block;
    width: 24px;
    padding: 0 2px;
    margin: 0 0 0 3px;
    text-align: left;

    font-size: 10px;
    font-weight: bold;

    vertical-align: middle;

    -webkit-box-shadow: 2px 2px 2px rgba( 0, 0, 0, 0.2 );
    -moz-box-shadow: 2px 2px 2px rgba( 0, 0, 0, 0.2 );
    box-shadow: 2px 2px 2px rgba( 0, 0, 0, 0.2 );
}
.skybrush_input_button {
    font-size: 11px;
    min-width: 50px;
    margin-left: 4px;
}

/*
 * SkyBrush Core / Root
 *
 * The main dom, it's viewports, and other starting places.
*/
.skybrush {
    width : 100%;
    height: 100%;
    min-height: 500px;
    /*min-width: 944px;*/ /*---overall width---*/

    position: relative;

    outline: 0;

    cursor: default;

    /*font-family: sans-serif;*/

}
/*
 * The top bar at the top of SkyBrush.
 * This includes zoom, undo/redo and other controls.
*/
.skybrush_topbar {
    display: block;
    height: 41px;
    width: 100%;

    /*background: white;*/   /*--remove white from button*/
    z-index: 6;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    -moz-box-sizing: border-box;
    box-sizing: border-box;

    padding: 10px 6px 0 6px;
}
.skybrush_button,
.skybrush_button:active,
.skybrush_button:visited,
.skybrush_button:hover {
    text-decoration: none;
}
.skybrush_button.sb_disabled,
.skybrush_button.sb_disabled:active,
.skybrush_button.sb_disabled:visited,
.skybrush_button.sb_disabled:hover {
    color: #aaa;
    border-color: #aaa;
}
.skybrush_button {
    /*margin: 0 6px;*/

    /*background: red; remove background from button*/
    /*border: 2px solid #668;*/

    /*-webkit-border-radius:4px;*/
    /*-moz-border-radius:4px;*/
    /*border-radius:4px;*/

    /*font-weight:bold;*/
    /*font-family:helvetica neue,arial,sans-serif;*/
    font-size:11px;

    /*padding:2px 4px;*/
    padding:0 3px;
    line-height:normal;
    /*display:inline-block;*/
    text-align:center;
    min-width:40px;
    /*text-transform: uppercase;*/
    cursor:pointer;
    text-shadow:0 1px 0 #fff;
    position: relative;

    /*-webkit-box-shadow:1px 2px 5px rgba(0,51,102,0.35);*/
    /*-moz-box-shadow:1px 2px 5px rgba(0,51,102,0.35);*/
    /*box-shadow:1px 2px 5px rgba(0,51,102,0.35);*/
}
.skybrush_button.undo {
    margin-left: 0;
}

.skybrush_topbar_seperator {
    float: left;
    margin-top: -1px;
    color: #aaa;
}
.skybrush_topbar_button_group {
    float: left;
}

/*
 * The complex wrapping is to achieve vertical centreing,
 * where the inner content is centred even if larger then
 * the outer content.
 *
 * This is to correctly centre all of the different types of sliders.
*/
.skybrush_topbar_zoom_wrap {
    float: right;
    clear: right;

    position: relative;
    margin: auto 0;
    font-size: 11px;
}
/*
 * 3) This layer moves back up, to full fill the vertical-centre effect.
*/
.skybrush_zoom_control {
    position: relative;

    margin-right: 0;
    padding: 1px 5px;

    /*display: table;*/
    float: right;
    clear: right;

    width: 145px;

    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
.skybrush_zoom_control.sb_fake {
    margin-top: 1px;
    height: 15px;
}
.skybrush_zoom_label {
    /*font-size: 16px;*/
    /*font-weight: bold;*/
    /*margin-top: 2px;*/
    /*line-height: 22px;*/
    vertical-align: middle;
    float: right;
}
.skybrush_top_bar_zoom_out,
.skybrush_top_bar_zoom_in,
.skybrush_zoom_bar_wrap {
    display: table-cell;
    vertical-align: middle;
}
.skybrush_top_bar_zoom_in,
.skybrush_top_bar_zoom_out {
    cursor: pointer;

    font-weight: bold;
    font-size: 15px;
    color: #7F7F7F !important;
    height: 15px;

    /* Secretly make it bigger then it is, so it's easier to click */
    min-width: 15px;
    text-align: center;

    height: 100%;
    line-height: 12px;
}
.skybrush_top_bar_zoom_in {
}
.skybrush_top_bar_zoom_out {
    padding-bottom: 3px;
}
.skybrush_top_bar_zoom_in.sb_fake {
    padding-top: 2px;
    padding-bottom: 0;
    margin-top: -2px;
}
.skybrush_top_bar_zoom_out.sb_fake {
    padding-bottom: 1px;
}
.skybrush.sb_ios .skybrush_top_bar_zoom_in {
    padding-bottom: 3px;
}
.skybrush_slider_bar.skybrush_zoom_bar {
    width: 100px;
    margin: 0 8px;
    display: inline-block;
    float: none;
    position: static;
    vertical-align: middle;

    position: relative;
    top: 0;
}
.skybrush_info_bar {
    z-index: 12;
    position: absolute;
    top:  34px;

    -webkit-transition: visibility 0s linear 100ms, opacity 100ms linear, height 100ms linear;
    -moz-transition: visibility 0s linear 100ms, opacity 100ms linear, height 100ms linear;
    -o-transition: visibility 0s linear 100ms, opacity 100ms linear, height 100ms linear;
    transition: visibility 0s linear 100ms, opacity 100ms linear, height 100ms linear;

    visibility:hidden;
    opacity:0;
    height: 0;
}
.skybrush_info_bar.sb_show {
    -webkit-transition: visibility 0s linear, opacity 100ms linear, height 100ms linear;
    -moz-transition: visibility 0s linear, opacity 100ms linear, height 100ms linear;
    -o-transition: visibility 0s linear, opacity 100ms linear, height 100ms linear;
    transition: visibility 0s linear, opacity 100ms linear, height 100ms linear;

    visibility: visible;
    opacity: 1;
    height: auto;
}
.skybrush_info_bar_wrap {
    position: relative;

    /* same height as the top_arrow */
    margin-top: 10px;

    float: left;
    clear: both;

    border-radius: 4px;
    box-shadow: 0px 3px 9px rgba( 0, 0, 0, 0.48 ), 0px 1px 1px rgba( 0, 0, 0, 0.6 );

    background: #4D758C; /* Old browsers */
    background: -moz-linear-gradient(top,  #295b75 0%, #4d758c 2%, #4d758c 34%, #3c667f 94%, #204f6b 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#295b75), color-stop(2%,#4d758c), color-stop(34%,#4d758c), color-stop(94%,#3c667f), color-stop(100%,#204f6b)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top,  #295b75 0%,#4d758c 2%,#4d758c 34%,#3c667f 94%,#204f6b 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top,  #295b75 0%,#4d758c 2%,#4d758c 34%,#3c667f 94%,#204f6b 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top,  #295b75 0%,#4d758c 2%,#4d758c 34%,#3c667f 94%,#204f6b 100%); /* IE10+ */
    background: linear-gradient(top,  #295b75 0%,#4d758c 2%,#4d758c 34%,#3c667f 94%,#204f6b 100%); /* W3C */
}
.skybrush_info_bar_wrap_top_arrow {
    border: 0 solid transparent;
    border-left-width: 15px;
    border-right-width: 15px;
    border-bottom: 14px solid #4D758C;

    width: 0;
    height: 0;

    /* center it horizontally */
    position: absolute;
    left: 50%;
    margin-left: -15px;

    top: -13px;
}
.skybrush_info_content,
.skybrush_info_content > input,
.skybrush_info_content > form > input {
    /*font-size: 16px;*/
}
.skybrush_info_content,
.skybrush_info_content > input[type=button],
.skybrush_info_content > form > input[type=button],
.skybrush_info_content > form > input[type=submit] {
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 1px rgba( 0, 0, 0, 0.7 );
}
.skybrush_info_content {
    margin: 13px 16px 14px 16px;
    float: left;
    /*min-height: 28px;*/
}
.skybrush_info_content > *,
.skybrush_info_content > form > * {
    float: left;
}
.skybrush_info_content > div,
.skybrush_info_content > form > div {
}
.skybrush_info_label {
    margin: 4px 4px 0 14px;
    text-transform: lowercase;
}
.skybrush_info_label:first-of-type {
    margin-left: 0;
}
.skybrush_info_content > input[type=text],
.skybrush_info_content > form > input[type=text] {
    margin: 0;
    width: 42px;
}
.skybrush_info_content > input[type=number],
.skybrush_info_content > form > input[type=number] {
    margin: 0;
    width: 30px;
    height: 10px;
}
.skybrush_info_content > input[type=checkbox],
.skybrush_info_content > form > input[type=checkbox] {
    margin-top: 8px;
}
.skybrush_info_content > input[type=button],
.skybrush_info_content > form > input[type=button],
.skybrush_info_content > form > input[type=submit] {
    background: none;

    border: #fff 1px solid;
    box-shadow: 2px 2px 3px rgba( 0, 0, 0, 0.3 );
    border-radius: 4px;
    padding: 1px 4px 3px 4px;

    margin-left: 13px;

    cursor: pointer;
}
.skybrush_info_content > form > input[type=submit] {
    margin-bottom: 0;
    margin-top: 2px;
    padding-bottom: 1px;
}
.skybrush_info_content > input[type=button]:hover,
.skybrush_info_content > form > input[type=button]:hover,
.skybrush_info_content > form > input[type=submit]:hover {
    border-color: #e9e9e9;
    color: #e9e9e9;
}
.skybrush_viewport {
    position: absolute;

    /* magical webkit speedup */
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
    -webkit-transform: translateZ(0);

    /* this is the height of .skybrush .topbar */
    top: 41px;

    bottom: 0;
    left: 0;
    right: 0;

    overflow: auto;
    background: #eaeaea;
}
.skybrush_viewport > canvas {
    position: absolute;

    image-rendering: optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}
.skybrush_canvas_draw,
.skybrush_canvas_upscale {
    border: 1px solid #aaa;
    background: url(./../img/canvas_back.png) repeat;
}
.skybrush_canvas_draw {
    border-radius: 3px;
    z-index: 0;

    -webkit-transition: width 200ms linear 0s, height 200ms linear 0s, -webkit-transform 200ms linear 0s;
    -moz-transition: width 200ms linear 0s, height 200ms linear 0s,    -moz-transform 200ms linear 0s;
    -o-transition: width 200ms linear 0s, height 200ms linear 0s,      -o-transform 200ms linear 0s;
    transition: width 200ms linear 0s, height 200ms linear 0s,         transform 200ms linear 0s;
}
.skybrush_canvas_overlay {
    border: 1px solid transparent;
    z-index: 2;
}

/* The overlay, only shown in non-Firefox for scaling */
.skybrush_canvas_upscale {
    z-index: 1;
    display: none;
    opacity: 0;

    -webkit-transition: opacity 200ms linear 0s;
    -moz-transition: opacity 200ms linear 0s;
    -o-transition: opacity 200ms linear 0s;
    transition: opacity 200ms linear 0s;
}
.skybrush_canvas_upscale.sb_offscreenY {
    border-radius: 0;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}
.skybrush_canvas_upscale.sb_offscreenX {
    border-radius: 0;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
}

/*
 * Cursors
*/
.sb_cursor_none {
    cursor: none;
}
.sb_cursor_default {
    /* needs to be set twice for IE, as the second cursor doesn't work */
    cursor: crosshair;
    cursor: url('./../img/cursors/crosshair.png') 7 7, crosshair;
}
.sb_cursor_picker {
    cursor: url('./../img/cursors/picker.png') 0 9, auto;
}
.sb_cursor_fill {
    cursor: url('./../img/cursors/fill.png') 5 13, auto;
}
.sb_cursor_fill {
    cursor: url('./../img/cursors/fill.png') 5 13, auto;
}
.sb_cursor_zoom_blank {
    cursor: url('./../img/cursors/zoom_blank.png') 5 5, auto;
}
.sb_cursor_zoom_in {
    cursor: url('./../img/cursors/zoom_in.png') 5 5, auto;
}
.sb_cursor_zoom_out {
    cursor: url('./../img/cursors/zoom_out.png') 5 5, auto;
}
.sb_cursor_cursor {
    cursor: url('./../img/cursors/cursor.png'), auto;
}
.sb_cursor_select {
    cursor: url('./../img/cursors/marquee.png'), auto;
}

/*
 * Canvas overlay graphics, like grids, marquees, and the copy selection.
*/

.skybrush_grid {
    position: absolute;
    /* Above the overlay */
    z-index: 3;

    -webkit-transition: visibility 0s linear 200ms, opacity 200ms linear;
    -moz-transition: visibility 0s linear 200ms, opacity 200ms linear;
    -o-transition: visibility 0s linear 200ms, opacity 200ms linear;
    transition: visibility 0s linear 200ms, opacity 200ms linear;

    visibility:hidden;
    opacity:0;

    overflow: hidden;
}
.skybrush_grid.sb_show {
    visibility: visible;
    opacity: 1;

    -webkit-transition: visibility 0s linear, opacity 200ms linear, width 200ms linear, height 200ms linear;
    -moz-transition: visibility 0s linear, opacity 200ms linear, width 200ms linear, height 200ms linear;
    -o-transition: visibility 0s linear, opacity 200ms linear, width 200ms linear, height 200ms linear;
    transition: visibility 0s linear, opacity 200ms linear, width 200ms linear, height 200ms linear;

}
.skybrush_grid_line {
    position: absolute;
    display: block;
    background: rgba( 60, 130, 160, 0.8 );
}
.skybrush_grid_line_vertical {
    height: 100%;
    width: 1px;
}
.skybrush_grid_line_horizontal {
    height: 1px;
    width: 100%;
}

.skybrush_copy,
.skybrush_marquee {
    display: none;
    position: absolute;

    -webkit-animation-duration: 1s;
    -webkit-animation-iteration-count: infinite;
    -moz-animation-duration: 1s;
    -moz-animation-iteration-count: infinite;
    -ms-animation-duration: 1s;
    -ms-animation-iteration-count: infinite;
    -o-animation-duration: 1s;
    o-animation-iteration-count: infinite;
    animation-duration: 1s;
    animation-iteration-count: infinite;
}
.skybrush_copy.sb_show,
.skybrush_marquee.sb_show {
    display: block;
}
.skybrush_copy {
    z-index: 4;
    border: 2px dashed #999;

    -webkit-animation-name: skybrush_copy_border_anim;
    -moz-animation-name: skybrush_copy_border_anim;
    -ms-animation-name: skybrush_copy_border_anim;
    -o-animation-name: skybrush_copy_border_anim;
    animation-name: skybrush_copy_border_anim;

    image-rendering: optimize-contrast;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}
.skybrush_copy.sb_show {
    opacity: 0.9;
}
.skybrush_marquee {
    z-index: 5;

    width : 0;
    height: 0;

    -webkit-transition: opacity 200ms linear 0s;
    -moz-transition: opacity 200ms linear 0s;
    -o-transition: opacity 200ms linear 0s;
    transition: opacity 200ms linear 0s;

    -webkit-transition-property: background-color, border-color;
    -moz-transition-property: background-color, border-color;
    -o-transition-property: background-color, border-color;
    transition-property: background-color, border-color;

    background-color: transparent;
    border: 2px dashed #18C;

    -webkit-animation-name: skybrush_marquee_border_anim;
    -moz-animation-name: skybrush_marquee_border_anim;
    -ms-animation-name: skybrush_marquee_border_anim;
    -o-animation-name: skybrush_marquee_border_anim;
    animation-name: skybrush_marquee_border_anim;
}
.skybrush_marquee.sb_show {
    opacity: 0.6;
}
.skybrush_marquee.sb_highlight {
    background-color: #33aaFF;
}
.skybrush_marquee.sb_highlight.sb_outside {
    box-shadow: 0 0 40px rgba( 200, 40, 40, 0.7 );
    background-color: #aa3333;
    border-color: #881111;

    -webkit-animation-name: skybrush_marquee_border_anim_outside;
    -moz-animation-name: skybrush_marquee_border_anim_outside;
    -ms-animation-name: skybrush_marquee_border_anim_outside;
    -o-animation-name: skybrush_marquee_border_anim_outside;
    animation-name: skybrush_marquee_border_anim_outside;
}
.skybrush_marquee.sb_reposition {
    -webkit-transition-property: background-color, border-color, width, height, -webkit-transform;
    -moz-transition-property: background-color, border-color, width, height, -moz-transform;
    -o-transition-property: background-color, border-color, width, height, -o-transform;
    transition-property: background-color, border-color, width, height, transform;
}

@-webkit-keyframes skybrush_marquee_border_anim {
    0%, 100% { border-color: #3cf; }
50% { border-color: #14a; }
}
@-moz-keyframes skybrush_marquee_border_anim {
    0%, 100% { border-color: #3cf; }
50% { border-color: #14a; }
}
@-ms-keyframes skybrush_marquee_border_anim {
    0%, 100% { border-color: #3cf; }
50% { border-color: #14a; }
}
@-o-keyframes skybrush_marquee_border_anim {
    0%, 100% { border-color: #3cf; }
50% { border-color: #14a; }
}
@keyframes skybrush_marquee_border_anim {
    0%, 100% { border-color: #3cf; }
50% { border-color: #14a; }
}

@-webkit-keyframes skybrush_marquee_border_anim_outside {
    0%, 100% { border-color: #b33; }
50% { border-color: #611; }
}
@-moz-keyframes skybrush_marquee_border_anim_outside {
    0%, 100% { border-color: #b33; }
50% { border-color: #611; }
}
@-ms-keyframes skybrush_marquee_border_anim_outside {
    0%, 100% { border-color: #b33; }
50% { border-color: #611; }
}
@-o-keyframes skybrush_marquee_border_anim_outside {
    0%, 100% { border-color: #b33; }
50% { border-color: #611; }
}
@keyframes skybrush_marquee_border_anim_outside {
    0%, 100% { border-color: #b33; }
50% { border-color: #611; }
}

@-webkit-keyframes skybrush_copy_border_anim {
    0%, 100% { border-color: #ccc; }
50% { border-color: #666; }
}
@-moz-keyframes skybrush_copy_border_anim {
    0%, 100% { border-color: #ccc; }
50% { border-color: #666; }
}
@-ms-keyframes skybrush_copy_border_anim {
    0%, 100% { border-color: #ccc; }
50% { border-color: #666; }
}
@-o-keyframes skybrush_copy_border_anim {
    0%, 100% { border-color: #ccc; }
50% { border-color: #666; }
}
@keyframes skybrush_copy_border_anim {
    0%, 100% { border-color: #ccc; }
50% { border-color: #666; }
}

/**
 * These are the floating windows on top of SkyBrush.
*/
.skybrush_gui {
    top: 0;
    border-radius:5px 5px 2px 2px;
}
.skybrush_gui_header {
    border-radius:4px 4px 0 0;
    border-bottom: 1px solid #333;
}

.skybrush_gui {
    background: #eaeaea;

    overflow: hidden;

    position: absolute;

    padding: 0;
    margin : 0;

    box-shadow: 0 0 20px rgba( 0, 0, 0, 0.4 );

    z-index: 10;

    -webkit-transition: opacity 200ms linear 0s;
    -moz-transition: opacity 200ms linear 0s;
    -o-transition: opacity 200ms linear 0s;
    transition: opacity 200ms linear 0s;

    opacity: 1;
}

/* Set correct cursor for components.
 *
 * Include the buttons as a workaround for an unknown Chrome
 * specific bug
*/
.skybrush_gui_header,
.skybrush_colors_palette_color,
.skybrush_color_alpha_bar,
.skybrush_color_mixer {
    cursor: pointer;
}

/*
 * Given to a GUI when it is clicked on.
 * This allows it to come to the front,
 * and effectively have focus.
*/
.skybrush_gui.sb_focus {
    z-index: 11
}
.skybrush_gui.sb_hide {
    opacity: 0;
}
.skybrush_gui_header {
    float: left;
    clear: both;
    display: block;

    width: 100%;

    -moz-box-sizing: border-box;
    box-sizing: border-box;

    padding: 7px 6px 4px 6px;

    box-shadow: 0 2px 2px rgba( 50, 50, 50, 0.2 );

    z-index: 1;
    position: relative;

    background: #3C667F;
    color: white;

    text-transform: uppercase;
    text-shadow: 0 2px 1px rgba( 0, 0, 0, 0.7 );

    font-size: 16px;
}
.skybrush_gui_content {
    float: left;
    clear: both;

    display: block;
    min-height: 8px;

    z-index: 0;
    position: relative;

    width: 100%;
    height: 100%;
}
/* For the 'SWATCHES' and TOOL SETTINGS' headers */
.skybrush_controls_header {
    float: left;
    clear: both;
    width: 100%;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    padding: 5px 5px 0 5px;
}
.skybrush_controls_header_line {
    float: right;
    height: 1px;
    background: #999;
    margin: 6px 0;
}
.skybrush_controls_header_text {
    float: left;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    -ms-text-shadow: 1px 1px 1px rgba( 0, 0, 0, 0.2 );
    text-shadow: 1px 1px 1px rgba( 0, 0, 0, 0.2 );
}

/**
 * The color picker.
*/
.skybrush_gui.sb_gui_colors {
    width: 150px;

    /* IE9 SVG */
    background: url();
    background: -moz-linear-gradient(top,  #dddddd 45%, #ffffff 50%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(45%,#dddddd), color-stop(50%,#ffffff)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top,  #dddddd 45%,#ffffff 50%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top,  #dddddd 45%,#ffffff 50%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top,  #dddddd 45%,#ffffff 50%); /* IE10+ */
    background: linear-gradient(top,  #dddddd 45%,#ffffff 50%); /* W3C */
}
.skybrush_gui.sb_gui_colors > .skybrush_gui_content > .skybrush_gui_header > .skybrush_controls_header_line {
    width: 78px;
}
.skybrush_colors_palette,
.skybrush_color_alpha_bar,
.skybrush_color_picker_current_color_back,
.skybrush_color_picker_current_color {
    border-radius: 2px;

    box-shadow: 1px 1px 7px rgba( 0, 0, 0, 0.25 );
}
.skybrush_colors_palette {
    width: 140px;
    float: left;

    margin: 5px;

    position: relative;

    text-align: center;

    float: left;
    clear: both;

    /* needed for border radius to work */
    overflow: hidden;
}
.skybrush_colors_palette_color {
    width:  28px;
    height: 24px;

    float: left;

    display: inline-block;
}
.skybrush_colors_palette_color_border {
    display: none;

    width:  20px;
    height: 16px;

    margin-left: 2px;
    margin-top:  2px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 1px;

    box-shadow: inset 0 0 3px #000;
    opacity: 0.55;
}
.skybrush_colors_palette_color_border.sb_show {
    opacity: 0.75;
}
/*
 * This fucks up on the ipad, so remove it.
*/
.skybrush_colors_palette_color_border.sb_show,
.skybrush_colors_palette_color.sb_hover_border:hover > .skybrush_colors_palette_color_border {
    display: block;
}
.skybrush_color_mixer {
    margin-left: 5px;
    float: left;
    clear: both;
    width:  140px;
    height: 140px;
    position: relative;

    margin-bottom: 5px;
}
.skybrush_color_mixer_back,
.skybrush_color_mixer_color_layer {
    display: block;
    position: absolute;

    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}
.skybrush_color_mixer_back {
    width: 0;
    height: 0;
    border: 70px solid transparent;
    border-top-color: red;
    border-left-color: red;
}
.skybrush_mixer_horizontal_line,
.skybrush_mixer_vertical_line,
.skybrush_color_wheel_line {
    position: absolute;
    width: 0;
    height: 0;
    background: white;
    opacity: 0.25;
    display: block;
}
.skybrush_mixer_horizontal_line {
    width: 100%;
    height: 4px;
    margin-top: -2px;
    left: 0;
}
.skybrush_mixer_vertical_line {
    width: 4px;
    height: 100%;
    top: 0;
    margin-left: -2px;
}
.skybrush_color_wheel_wrap {
    position: absolute;
    right: 0;
    bottom: 0;

    width : 77px;
    height: 77px;
}
.skybrush_color_wheel_colour_wheel {
    border-radius: 100px;
    box-shadow: 1.5px 1px 2px rgba( 0, 0, 0, 0.3 );
    display: block;
}
.skybrush_color_wheel_line_outer {
    top :  38px;
    left: 0;
    position: absolute;

    width: 100%;
    height: 1px;
}
.skybrush_color_wheel_line {
    width: 43px;
    height: 17px;
    margin-top: -8px;
    margin-left: 4px;

    background: url(./../img/colour_wheel_line.png) no-repeat 0 0;
    font-family: "kdkdkdkdlfsjfdj";

    position: absolute;
    left: 0;
    top : 0;

    opacity: 1;
}
.skybrush_color_alpha_wrap {
    float: right;

    margin: 0 7px 0 0;
    width: 24px;
    height: 100%;

    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
.skybrush_color_alpha_bar {
    border: 1px solid #aaa;

    width: 100%;
    height: 100%;
    background: black;

    position: relative;
}
.skybrush_color_alpha_gradient {
    width: 100%;
    height: 100%;
    display: block;
}
.skybrush_color_alpha_line {
    width: 30px;
    height: 10px;
    margin-top: -5px;
    margin-left: -4px;

    background: url(./../img/alpha_slider.png) no-repeat 0 0;

    position: absolute;
    left: 0;
    top : 0;
}
.skybrush_color_picker {
    clear: both;

    width: 140px;
    height: 90px;

    position: relative;

    padding: 6px 5px 5px 5px;

    float: left;
    clear: both;
}
.skybrush_color_picker_current_color_back,
.skybrush_color_picker_current_color {
    float: left;
    clear: both;

    width : 40px;
    height : 40px;

    display: block;

    position: absolute;

    /* matches padding of the parent colour_picker */
    top: 6px;
    bottom: 43px;
}
.skybrush_color_picker_current_color_back {
    background: url(./../img/canvas_back.png) repeat;
}
.skybrush_color_picker_current_color {
    background: white;
}
.skybrush_rgb_form {
    float: right;
    clear: right;
    margin: 1px 0 0 5px;
}
.skybrush_rgb_wrap {
    float: left;
    clear: both;
    width: 100%;
    margin: 3px 0;
}
.skybrush_rgb_label {
    text-transform: uppercase;
    margin-top: 2px;
    float: left;
    font-size: 10px;
    font-weight: bold;
}
.skybrush_rgb_input::-webkit-inner-spin-button,
.skybrush_rgb_input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.skybrush_rgb_input {
    float: right;
}
.skybrush_destination_alpha {
    float: left;
    clear: both;

    text-align: center;

    width: 100%;

    margin: 0 0 5px 0;
}
.skybrush_destination_alpha > .skybrush_command_control_label {
    margin-top: 5px;
    float: none;
    display: inline;
}
.skybrush_destination_alpha > input {
}

.skybrush_gui.sb_gui_commands {
    width: 150px;

    /* IE9 SVG, needs conditional override of 'filter' to 'none' */
    background: url();
    background: -moz-linear-gradient(top,  #dddddd 66%, #ffffff 78%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(66%,#dddddd), color-stop(78%,#ffffff)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top,  #dddddd 66%,#ffffff 78%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top,  #dddddd 66%,#ffffff 78%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top,  #dddddd 66%,#ffffff 78%); /* IE10+ */
    background: linear-gradient(top,  #dddddd 66%,#ffffff 78%); /* W3C */
}
.skybrush_gui.sb_gui_commands > .skybrush_gui_content > .skybrush_gui_header > .skybrush_controls_header_line {
    width: 55px;
}
.skybrush_commands_pane {
    float: left;
    clear: both;
    margin: 5px;
}
/*
 * Actual Command button setup.
 *
 * All of the commands share the same sprite sheet,
 * except the colour picker, which does it's own thing.
*/
.skybrush_gui_command {
    width:  30px;
    height: 30px;
    display: block;

    float: left;

    margin: 0 4px 4px 0;

    position: relative;
}
.skybrush_gui_command:nth-of-type(3n) {
    margin-right: 0;
}
.skybrush_command_back {
    position: absolute;
    left: -1px;
    top: -1px;

    background: url(./../img/tool_back.png) no-repeat 0 0;

    opacity: 0;

    display: block;
    width: 30px;
    height:30px;

    -webkit-transition: opacity 150ms linear 0s;
    -moz-transition: opacity 150ms linear 0s;
    -o-transition: opacity 150ms linear 0s;
    transition: opacity 150ms linear 0s;
}
.skybrush_gui_command:hover > .skybrush_command_back {
    opacity: 0.5;
}
.skybrush_gui_command.sb_selected > .skybrush_command_back,
.skybrush_gui_command.sb_selected:hover > .skybrush_command_back {
    opacity: 1;
}
.skybrush_gui_command > a {
    position: absolute;
    width: 30px;
    height: 30px;

    top: 0;
    left: 0;
    background: url(./../img/tool_command_buttons.png) 0 0;
}
.sb_command_pencil > a {
    background-position: 0 0;
}
.sb_command_eraser > a {
    background-position: -30px 0;
}
.sb_command_rectangle > a {
    background-position: -30px -30px;
}
.sb_command_circle > a {
    background-position: 0 -30px;
}
.sb_command_line > a {
    background-position: -60px -30px;
}
.sb_command_fill > a {
    background-position: -60px 0;
}
.sb_command_zoom > a {
    background-position: 2px -58px;
}
.sb_command_select > a {
    background-position: -30px -58px;
}
.sb_command_brush > a {
    background-position: -58px -58px;
}
.sb_command_move > a {
    background-position: 0px -88px;
}
.sb_command_picker {
    position: absolute;
    bottom: -2px;
    left: 5px;

    width:  30px;
    height: 30px;
}
.sb_command_picker > .skybrush_command_back {
    background: url(./../img/eyedropper_back.png) no-repeat 0 0;

    width: 30px;
    height: 30px;
}
.sb_command_picker > a {
    background-position: -4px 28px;

    width: 30px;
    height:30px;
}

.skybrush_command_controls {
    float: left;
    clear: both;
    width: 140px;
    margin: 8px 5px 13px 5px;
}
.skybrush_command_controls_inner {
    float: left;
    clear: both;
    width:  100%;
    height: 100%;

    display: none;
}
.skybrush_command_controls_inner.sb_show {
    display: block;
}
.skybrush_command_controls_inner > .skybrush_control {
    float: left;
    clear: both;
    width: 100%;
}
.skybrush_command_controls_inner > .skybrush_control.sb_control_checkbox {
}
.skybrush_command_controls_inner > .skybrush_control.sb_control_checkbox > input {
    margin: 0 3px 3px 4px;
    vertical-align: bottom;
}
.skybrush_command_controls_inner > .skybrush_control.skybrush_control_slider {
    margin-bottom: 2px;
}
.skybrush_control.sb_control_slider > .skybrush_slider_bar {
    float: right;
    width: 65px;
    top: -3px;
}
.skybrush_control.sb_control_slider > .skybrush_slider_bar.sb_fake {
    top: 4px;
}
.skybrush_control.sb_control_slider.sb_outline_size_cmd > .skybrush_slider_bar {
    width: 55px;
}
.skybrush_control.sb_control_slider.sb_tolerance > .skybrush_slider_bar {
    width: 42px;
}
.skybrush_control.sb_control_slider > .skybrush_slider_bar_inner {
    height: 1px;
}
.skybrush_control.sb_control_slider > .skybrush_input::-webkit-inner-spin-button,
.skybrush_control.sb_control_slider > .skybrush_input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.skybrush_control.sb_control_slider > .skybrush_input {
    float: right;
    clear: right;

    margin-left: 8px;
    width: 22px;
}
.skybrush_control.sb_control_toggle > .skybrush_command_control_label {
    padding-top: 5px;
}

/*
 * The custom drawn mouse cursor,
 * which looks like the current brush.
*/
.skybrush_brush {
    display: block;
    position: absolute;
    top: 0;

    /* above the canvas and overlay */
    z-index: 3;

    background: transparent;
    background-repeat: no-repeat;
    cursor: none !important;
}

/*
 * Browser specific differences.
*/
.skybrush.sb_ios * {
    text-shadow: none;
}
.skybrush.sb_ios > .skybrush_gui {
    background: #f5f5f5;
}

